﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<iss.sg4210.se18.team6s.jass.DAL.AdvertiserAccount>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Edit
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        Edit</h2>
    <% using (Html.BeginForm())
       {%>
    <%: Html.ValidationSummary(true) %>
    <fieldset>
        <legend>Fields</legend>
        <%:Html.HiddenFor(model=>model.UserId) %>
        <div class="editor-label">
            <%: Html.LabelFor(model => model.UserId) %>
        </div>
        <div id="UsersList" class="editor-field">
        </div>
        <div class="editor-label">
            <%: Html.LabelFor(model => model.AccountBalance) %>
        </div>
        <div class="editor-field">
            <%: Html.TextBoxFor(model => model.AccountBalance, String.Format("{0:F}", Model.AccountBalance)) %>
            <%: Html.ValidationMessageFor(model => model.AccountBalance) %>
        </div>
        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
    <% } %>
    <div>
        <%: Html.ActionLink("Back to List", "Index") %>
    </div>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#UsersList").load("/AdvertiserAccount/UsersList/" + $("#UserId").val());
        });
    </script>
</asp:Content>
